package com.threeti.mecool.core.application.report;

import com.threeti.mecool.core.util.BigDecimalUtil;

import java.io.Serializable;

public class SellIntoRate implements Serializable {
    private String adminDivAreaName;
    private String adminDivAreaCode;
    private int plannedQuantityOfSellInto;
    private int actualQuantityOfSellInto;

    public SellIntoRate(String adminDivAreaCode, int plannedQuantityOfSellInto, int actualQuantityOfSellInto) {
        super();
        this.adminDivAreaCode = adminDivAreaCode;
        this.plannedQuantityOfSellInto = plannedQuantityOfSellInto;
        this.actualQuantityOfSellInto = actualQuantityOfSellInto;
    }

    public SellIntoRate(String adminDivAreaName, String adminDivAreaCode, int plannedQuantityOfSellInto,
                        int actualQuantityOfSellInto) {
        this(adminDivAreaCode, plannedQuantityOfSellInto, actualQuantityOfSellInto);
        this.adminDivAreaName = adminDivAreaName;
    }

    public String getAdminDivAreaName() {
        return adminDivAreaName;
    }

    public String getAdminDivAreaCode() {
        return adminDivAreaCode;
    }

    public int getPlannedQuantityOfSellInto() {
        return plannedQuantityOfSellInto;
    }

    public int getActualQuantityOfSellInto() {
        return actualQuantityOfSellInto;
    }

    public String getPercentValueFormatted() {
        return BigDecimalUtil.percentFormattedValueOf(actualQuantityOfSellInto, plannedQuantityOfSellInto);
    }

    public int getPercentIntValue() {
        return BigDecimalUtil.percentIntValueOf(actualQuantityOfSellInto, plannedQuantityOfSellInto);
    }

    public SellIntoRate() {
        super();
    }

    @Override
    public String toString() {
        return "SellIntoRate [adminDivAreaName=" + adminDivAreaName + ", adminDivAreaCode=" + adminDivAreaCode
                + ", plannedQuantityOfSellInto=" + plannedQuantityOfSellInto + ", actualQuantityOfSellInto="
                + actualQuantityOfSellInto + "]";
    }

    public void setAdminDivAreaName(String adminDivAreaName) {
        this.adminDivAreaName = adminDivAreaName;
    }

    public void setAdminDivAreaCode(String adminDivAreaCode) {
        this.adminDivAreaCode = adminDivAreaCode;
    }

    public void setPlannedQuantityOfSellInto(int plannedQuantityOfSellInto) {
        this.plannedQuantityOfSellInto = plannedQuantityOfSellInto;
    }

    public void setActualQuantityOfSellInto(int actualQuantityOfSellInto) {
        this.actualQuantityOfSellInto = actualQuantityOfSellInto;
    }

}
